/**
 * 留言表
 */
 module.exports = function (sequelize, DataTypes,Model) {
    class CommentModel extends Model {
    }
    CommentModel.init({
        id: {
            type: DataTypes.INTEGER,
            primaryKey: true,
            autoIncrement: true,
            comment:"主键"
        },
        username: {
            type: DataTypes.STRING,
            allowNull: false,
            comment:"用户名"
        },
        phone: {
            type: DataTypes.STRING,
            allowNull: false,
            comment: "手机号",
            unique: true
        },
        content: {
            type: DataTypes.STRING,
            allowNull: false,
            comment:"账号密码" 
        },
        create_time: {
            type: DataTypes.DATE,
            allowNull: true,
            comment: "评论时间点",
        },
    }, {
        sequelize,
        modelName:"comment"
    })
    return CommentModel
}